# -*- coding: utf-8 -*- 
# @Time : 2021/4/5 17:56 
# @Author : Dong 
# @File : fashionsnap.py
import re

base_url = 'https://zgispfzeqk-2.algolianet.com/1/indexes/*/queries?'
headers = {
    'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36'
}

import time
from multiprocessing import Pool

import requests
from pyquery import PyQuery as pq

# 1.拿到需要代理的ip
class Download():
    def __init__(self):
        self.ip_list = []
        self.url = base_url
        self.headers = headers

    def get(self,):
        response = requests.get(self.url + str(num))
        if response.status_code == 200:
            return response.text

        else:
            print('请求失败')

    # def parse_one(self,html):
    #     doc = pq(html)
    #     pattern2 = re.compile('</span><a href="(/streetstyle/.*?)">')
    #     item2 = re.findall(pattern2, fash)
    #     print(item2)




if __name__ == '__main__':
    proxy = Download()
    fash = proxy.get()
        # proxy.parse_one(fash)